//
//  SearchBar.h
//  StaffTax
//
//  Created by 侯伟 on 2020/2/25.
//  Copyright © 2020 侯伟. All rights reserved.
//
// 搜索框

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@class SearchBar;

@protocol SearchBarDelegate <NSObject>

@optional
- (void)searchBar:(SearchBar*)searchBar textDidChange:(nonnull NSString *)searchWord;

@optional
- (void)searchBar:(SearchBar *)searchBar typeDidChange:(SearchType)type;

@optional
- (void)searchBarCancelButtonClicked:(SearchBar *)searchBar;

@end

@interface SearchBar : MyLinearLayout

@property(nonatomic,assign)id<SearchBarDelegate> delegate;

/// 搜索关键字 如果有 用于填充搜索框
@property(nonatomic,copy)NSString* searchWord;

/// 占位文本
@property(nonatomic,copy)NSString* placeholder;


@property(nonatomic,assign)SearchType searchType;

@end

NS_ASSUME_NONNULL_END
